<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\V1\JsSdkController;
use App\Http\Controllers\Api\V1\TypesController;
use App\Http\Controllers\Api\V1\VideosController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});


Route::prefix('v1')->name('api.v1.')->group(function () {
    Route::get('jsSdk', [JsSdkController::class, 'jsSdk'])->name('types.index'); // 微信jsSdk
    Route::get('types', [TypesController::class, 'index'])->name('types.index'); // 分类列表
    Route::get('videos', [VideosController::class, 'index'])->name('videos.index'); // 视频列表


});
